css: Pass property_id to compute function
authorBenjamin Otte <otte@redhat.com>
Thu, 12 Jul 2012 01:43:15 +0000 (03:43 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 28 Aug 2012 13:40:56 +0000 (15:40 +0200)
commit9b4ed662181cabde506248cf8b344420a0300a3e
tree50063700a3f95fa1af072c20202c0387ffff4040
parent9b953829fbf1332d00c2ca8a99c7da5e4bda8c64
css: Pass property_id to compute function

This is a reorganization of how value computing should be done.
Previously the GtkCssStyleProperty.compute vfunc was supposed to take
care of special cases when it needed those for computation. However,
this proved to be very complicated in cases where values were nested and
only the last value (of a common type) needed to be special cased.

A common example for this was the fallback handling for unresolvable
colors.

Now, we pass the property's ID along with all compute functions so we
can do the special casing where it's necessary.
Note that no actual changes happen in this commit. This will happen in
follow-ups.
26 files changed:
gtk/gtkcssarrayvalue.c
gtk/gtkcssbgsizevalue.c
gtk/gtkcssbordervalue.c
gtk/gtkcsscornervalue.c
gtk/gtkcsseasevalue.c
gtk/gtkcssenginevalue.c
gtk/gtkcssenumvalue.c
gtk/gtkcssimage.c
gtk/gtkcssimagegradient.c
gtk/gtkcssimagelinear.c
gtk/gtkcssimageprivate.h
gtk/gtkcssimagevalue.c
gtk/gtkcssinheritvalue.c
gtk/gtkcssinitialvalue.c
gtk/gtkcssnumbervalue.c
gtk/gtkcsspositionvalue.c
gtk/gtkcssrepeatvalue.c
gtk/gtkcssrgbavalue.c
gtk/gtkcssshadowsvalue.c
gtk/gtkcssshadowvalue.c
gtk/gtkcssstringvalue.c
gtk/gtkcssstylepropertyimpl.c
gtk/gtkcsstypedvalue.c
gtk/gtkcssvalue.c
gtk/gtkcssvalueprivate.h
gtk/gtksymboliccolor.c